<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="html"/>

<xsl:template match="/">
	<html>
	<head><title>SQL Dependency Documentation</title></head>
	<body>
	
	OBJECT LIST
	
	<br/>
	<br/>
	<br/>
	<div id="root_procedures">
	<div id="title_procedures">
	PROCEDURES
	</div>
	<div id="body_procedures">
	<xsl:apply-templates select="/object_list/object[object_path = '/PROCEDURE']">
		<xsl:sort data-type="text" select="@name"/>
	</xsl:apply-templates>
	</div>
	</div>
	
	<br/>
	<br/>
	<div id="root_functions">
	<div id="title_functions">
	FUNCTIONS
	</div>
	<div id="body_functions">
	<xsl:apply-templates select="/object_list/object[object_path = '/FUNCTION']">
		<xsl:sort data-type="text" select="@name"/>
	</xsl:apply-templates>
	</div>
	</div>
	
	</body>
	</html>
</xsl:template>

<xsl:template match="object">
	<br/>
	<br/>
	<a>
		<xsl:attribute name="href">
			.<xsl:value-of select="object_path"/>/<xsl:value-of select="@name"/>.xml
		</xsl:attribute>
		<xsl:value-of select="@name"/>
	</a>
</xsl:template>

</xsl:stylesheet>
